package com.mxf.code.dao;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.mxf.code.entity.AppUser;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.mapping.ResultSetType;
import org.apache.ibatis.session.ResultHandler;
import org.springframework.stereotype.Repository;

/**
 * app用户表(AppUser)表数据库访问层
 *
 * @author makejava
 * @since 2023-02-20 10:19:32
 */
@Repository
public interface AppUserDao extends BaseMapper<AppUser> {

    @Select("SELECT * FROM app_user WHERE name LIKE '用户9%'")
    @Options(resultSetType = ResultSetType.FORWARD_ONLY, fetchSize = 1000)
    @ResultType(AppUser.class)
    void listData(@Param(Constants.WRAPPER) QueryWrapper<AppUser> wrapper, ResultHandler<AppUser> handler);
}

